package com.iie.bigVideo.mapper;

import com.iie.bigVideo.entity.SysUser;
import com.iie.bigVideo.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iie.bigVideo.entity.dto.UserDto;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author XXX
 * @since 2023-11-20
 */
public interface UserMapper extends BaseMapper<User> {
    User queryUser(@Param("id") int id);

    List<UserDto> queryUserListPage(@Param("current") int current, @Param("size") int size, @Param("user") User user);

    Integer countUser(@Param("user") User user);

    Integer addUser(User user);

    User queryUserByUserName(@Param("userName") String userName);

    Boolean updateByUserId(User user);

    Boolean updateStateByUserID(@Param("id") int id, @Param("isDelete") int isDelete);

    Integer deleteByUserID(@Param("id") int id);

    UserDto userLogin(@Param("userName") String userName);

    List<User> deleteUserCatalogId(@Param("catalogId") String CatalogId);

    Boolean updateUserList(@Param("userList") List<User> userList);

    Integer addUserList(@Param("userArrayList") List<UserDto> userArrayList);

}
